package com.atguigu.userprofile.dao

import com.atguigu.userprofile.bean.{TagInfo, TaskInfo}
import com.atguigu.userprofile.util.MysqlUtil

object TaskInfoDAO {



  def getTaskInfo(taskId:String): TaskInfo ={
    val sql=s"select * from task_info ti where ti.id='$taskId'"
    val maybeInfo: Option[TaskInfo] = MysqlUtil.queryOne(sql, classOf[TaskInfo], true)
    var taskInfo:TaskInfo=null;

    if(maybeInfo!=None){
      taskInfo= maybeInfo.get
    }else{
      throw new RuntimeException("未查询出任务对象")
    }

    taskInfo

  }

}
